<?php
/**
 * Class 个人中心.
 * User: chan
 * Date: 2017/10/20 11:22
 */

namespace app\api\controller;
class Personal extends Base
{
    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'except' => 'except'
        ],
    ];

    /**
    *   个人中心详情页
    */
    public function index(){
        $index =  (new \app\api\logic\Personal())->index();
        return $this->ajaxReturn($index);
    }

    /**
    *   个人中心详情
    */
    public function userInfo(){
        $userInfo =  (new \app\api\logic\Personal())->userInfo();
        return $this->ajaxReturn($userInfo);
    }

    /**
    *  钱包余额
    */
    public function balance(){
        $balance =  (new \app\api\logic\Personal())->balance();
        return $this->ajaxReturn($balance);
    }

    /**
     *  钱包明细
     */
    public function wallet(){
        $wallet =  (new \app\api\logic\Personal())->wallet();
        return $this->ajaxReturn($wallet);
    }
    /**
    *   钱包提现记录
    */
    public function withdraw(){
        $withdraw =  (new \app\api\logic\Personal())->withdraw();
        return $this->ajaxReturn($withdraw);
    }

    /**
     *   钱包提现申请
     */
    public function walletWithdraw()
    {
        $walletWithdraw = (new \app\api\logic\Personal())->walletWithdraw();
        return $this->ajaxReturn($walletWithdraw);
    }

    /**
     * 绑定银行卡
     */
    public function bindcard()
    {
        $result =  (new \app\api\logic\Personal())->bindcard();
        return $this->ajaxReturn($result);
    }
    /**
     * 银行卡详情
     */
    public function bankdetail()
    {
        $result =  (new \app\api\logic\Personal())->bankdetail();
        return $this->ajaxReturn($result);
    }
    /**
     * 解绑银行卡
     */
    public function unbundling()
    {
        $result =  (new \app\api\logic\Personal())->unbundling();
        return $this->ajaxReturn($result);
    }
}